package com.jlastu.znb.view;

import android.content.Intent;
import android.os.Bundle;
import androidx.fragment.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.LinearLayout;

import com.jlastu.znb.R;

public class LessonFragment extends Fragment {

    public LessonFragment() {

    }

    @Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container,
                             Bundle savedInstanceState) {
        final View view = inflater.inflate(R.layout.fragment_lesson, container, false);

// 找到LinearLayout并设置点击监听器
        LinearLayout lessonLinearLayout = view.findViewById(R.id.tdxw);
        lessonLinearLayout.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Intent intent = new Intent(getActivity(),AgricultureSkillDetailActivity.class);
                startActivity(intent);
            }
        });
        LinearLayout lessonLinearLayout1 = view.findViewById(R.id.tdxw1);
        lessonLinearLayout1.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Intent intent = new Intent(getActivity(),xw1Activity.class);
                startActivity(intent);
            }
        });
        return view;
    }
}